wayland: Don't pass parent when creating dynamic positioner
authorJonas Ådahl <jadahl@gmail.com>
Mon, 12 Sep 2016 10:24:50 +0000 (18:24 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Wed, 14 Sep 2016 03:29:32 +0000 (11:29 +0800)
When using the dynamic positioner (i.e. positioning from move_to_rect)
we can always rely on having a proper transient-for to position
relative to, so lets drop the ignored parameter.

https://bugzilla.gnome.org/show_bug.cgi?id=771117

gdk/wayland/gdkwindow-wayland.c

index c411da5ffb5c3e0c5df118dd1b64d91d31789858..4614d48f45ecf29b69e5010b359e48f6fb84d0c6 100644 (file)
@@ -1873,13 +1873,13 @@ calculate_moved_to_rect_result (GdkWindow    *window,
 }
 
 static struct zxdg_positioner_v6 *
-create_dynamic_positioner (GdkWindow *window,
-                           GdkWindow *parent)
+create_dynamic_positioner (GdkWindow *window)
 {
   GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
   GdkWaylandDisplay *display =
     GDK_WAYLAND_DISPLAY (gdk_window_get_display (window));
   struct zxdg_positioner_v6 *positioner;
+  GdkWindow *parent;
   GdkRectangle geometry;
   enum zxdg_positioner_v6_anchor anchor;
   enum zxdg_positioner_v6_anchor gravity;
@@ -2018,7 +2018,7 @@ gdk_wayland_window_create_xdg_popup (GdkWindow      *window,
   gdk_window_freeze_updates (window);
 
   if (impl->position_method == POSITION_METHOD_MOVE_TO_RECT)
-    positioner = create_dynamic_positioner (window, parent);
+    positioner = create_dynamic_positioner (window);
   else
     positioner = create_simple_positioner (window, parent);